﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinFormsApp1.Entity
{
    public class ModelBase : IDeleted
    {
        /// <summary>
        /// 系统字段-创建人
        /// </summary>
        [SugarColumn(ColumnName = "SysCreateUser")]
        public int SysCreateUser { get; set; }

        /// <summary>
        /// 系统字段-创建时间
        /// 默认值:CURRENT_TIMESTAMP
        /// </summary>
        [SugarColumn(ColumnName = "SysCreateTime", InsertServerTime = true, IsOnlyIgnoreUpdate = true)]
        public DateTime SysCreateTime { get; set; }

        /// <summary>
        /// 系统字段-修改人
        /// </summary>
        [SugarColumn(ColumnName = "SysUpdateUser")]
        public int SysUpdateUser { get; set; }

        /// <summary>
        /// 系统字段-修改时间
        /// 默认值:CURRENT_TIMESTAMP
        /// </summary>
        [SugarColumn(ColumnName = "SysUpdateTime", InsertServerTime = true, UpdateServerTime = true)]
        public DateTime? SysUpdateTime { get; set; }


        /// <summary>
        /// 系统字段-删除人
        /// </summary>
        [SugarColumn(ColumnName = "SysDeleteUser", IsNullable = true)]
        public int? SysDeleteUser { get; set; }

        /// <summary>
        /// 系统字段-删除时间
        /// </summary>
        [SugarColumn(ColumnName = "SysDeleteTime", IsOnlyIgnoreInsert = true, IsNullable = true)]
        public DateTime? SysDeleteTime { get; set; }

        /// <summary>
        /// 系统字段-删除标记
        /// 默认值:0
        [SugarColumn(ColumnName = "SysIsDelete", DefaultValue = "0")]
        public bool SysIsDelete { get; set; }
    }
}
